﻿<UserControl x:Class="TfsBranchLib2.View.BranchedHistoryOutputControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <DataGrid AutoGenerateColumns="False" Name="historyGrid" HorizontalGridLinesBrush="#FFD4D4D4"
                  VerticalGridLinesBrush="#FFD4D4D4" IsReadOnly="True" MouseDoubleClick="HistoryGridMouseDoubleClick">
            <DataGrid.ContextMenu>
                <ContextMenu Opened="ContextMenuOpened">
                    <MenuItem Header="Details" Name="detailsMenuItem" Click="DetailsMenuItemClick" />
                    <MenuItem Header="Compare" Name="compareContextItem" Click="CompareContextClick" IsEnabled="False" />
                </ContextMenu>
            </DataGrid.ContextMenu>
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding ID}" Header="ID" Width="50" />
                <DataGridTextColumn Binding="{Binding Committer}" Header="User" />
                <DataGridTextColumn Binding="{Binding RegistryDateFormatted}" Header="Date"
                                    SortMemberPath="RegistryDate" />
                <DataGridTextColumn Binding="{Binding Branch.Name}" Header="Branch" />
                <DataGridTextColumn Binding="{Binding Changes}" Header="Changes" />
                <DataGridTextColumn Binding="{Binding Comment}" Header="Comments" Width="*" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>